package cn.darkhorse.alarm.mapper;

import cn.darkhorse.alarm.dto.AlarmParameterAndDeviceTable;
import cn.darkhorse.alarm.pojo.AlarmParameterSettings;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author maoguanjun
 * @since 2023-04-07
 */
public interface MesAlarmMapper extends BaseMapper<AlarmParameterSettings> {
	
	/**
	 * 获取设备的最新一条数据
	 * @param tableName
	 * @return
	 */
	Map<String,Object> getLastXiongkongDevice(@Param("tableName") String tableName,@Param("lastDevice") Long lastDevice);
	
	/**
	 * 获取设备参数及其数据所对应的表
	 * @return
	 */
	List<AlarmParameterAndDeviceTable> getAlarmParameterAndDeviceTable();
	
}
